﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Login</title>
    <meta charset="utf-8">
    <link href="~/Content/css/style.css" rel="stylesheet" type='text/css' />
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
</head>
<body>
    <div class="main">
        <div class="login-form">
            <h1>Member Login</h1>
            <div class="head">
                <img src="~/Content/images/user.png" />
            </div>
            <form action="/Behavior/Login" method="post">
                <input type="text" class="text"  name="UserTel" placeholder="输入手机号" onblur="check()"/>
                <input type="password"  name="UserPwd" placeholder="输入密码"/>
                <div class="submit">
                    <input type="submit" onclick="myFunction()" value="LOGIN">
                </div>
                <p><a href="#">Forgot Password ?</a></p>
                <p>Not Account ?<a href="/Behavior/Regin" style="font-size:20px;color:#0094ff"> Register </a></p>
            </form>
        </div>
        <!--//End-login-form-->
        <!-----start-copyright---->
        <div class="copy-right">
            <p>Copyright &copy; 2014.Company name All rights reserved.</p>
        </div>
        <!-----//end-copyright---->
    </div>
    <div style="display:none">
        @*<script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>*@
</body>
</html>
<script>
    function check()
    {
        var UserTel = $("[name='UserTel']").val();
        $.ajax({
            url: "/behavior/check",
            dataType: "json",
            data: { UserTel: UserTel },
            type: "post",
            success: function (obj) {
                if (obj != 1)
                {
                    alert("手机号错误！");
                }
                
            }
        })
    }
</script>
